package com.gxa.modules.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.modules.sys.entity.Emp;
import com.gxa.modules.sys.mapper.EmpMapper;
import com.gxa.modules.sys.service.EmpService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl extends ServiceImpl<EmpMapper, Emp> implements EmpService {
    @Override
    public Emp queryByEname(String ename) {
        Emp emp = baseMapper.selectOne(new QueryWrapper<Emp>().eq("ename", ename));
        return emp;
    }

    @Override
    public void updateTel(Integer eid,String tel) {
        baseMapper.updateTelByEid(eid,tel);
    }

    @Override
    public List<Emp> queryTel() {
        List<Emp> emps = this.baseMapper.queryTel();
        return emps;
    }
}
